fix: resolve all compilation warnings for clean build#163
Conversation
- CA2022: explicitly discard Stream.Read return value in buffer drain loop - CS8600/CS8602: add nullable annotations for null assignments and dereferences - xUnit1031: convert blocking Task.WaitAll to async Task.WhenAll in tests - xUnit1048: convert async void test methods to async Task - xUnit2031: use Assert.Single predicate overload instead of Where+Single - xUnit1012: make DeviceTypeDetector.DetectFromPartNumber accept nullable string Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review Summary by QodoResolve all 21 compilation warnings for clean zero-warning build
WalkthroughsDescription• Resolved 21 unique compilation warnings across net8.0/net9.0 TFMs • Converted blocking Task.WaitAll to async await Task.WhenAll in tests • Changed async void test methods to async Task for proper async handling • Added nullable annotations (?) for null assignments and dereferences • Fixed CA2022 warning by explicitly discarding Stream.Read return value • Updated DeviceTypeDetector.DetectFromPartNumber to accept nullable string • Used Assert.Single predicate overload instead of Where+Single pattern Diagramflowchart LR
A["Compilation Warnings<br/>21 unique locations"] -->|"CA2022: Stream.Read"| B["StreamMessageConsumer<br/>Discard return value"]
A -->|"CS8600/CS8602: Nullability"| C["Add nullable annotations<br/>string? parameters"]
A -->|"xUnit violations"| D["Test code fixes"]
D -->|"xUnit1048: async void"| E["Convert to async Task"]
D -->|"xUnit1031: blocking"| F["Task.WaitAll → Task.WhenAll"]
D -->|"xUnit2031: LINQ"| G["Assert.Single predicate"]
C -->|"DeviceTypeDetector"| H["Accept nullable string"]
B --> I["Zero-warning build<br/>net8.0 & net9.0"]
E --> I
F --> I
G --> I
H --> I
File Changes1. src/Daqifi.Core.Tests/Channel/AnalogChannelTests.cs
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
Summary
Stream.ReadinStreamMessageConsumerand madeDeviceTypeDetector.DetectFromPartNumberaccept nullable string to match its actual contractasync void→async Task,Task.WaitAll→await Task.WhenAll, added nullable annotations, and usedAssert.Singlepredicate overloadTest plan
dotnet buildproduces 0 warnings, 0 errors🤖 Generated with Claude Code